﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Common.DataAnnotations
{
    /// <summary>
    /// 账户名验证（必须字母开头，6-18位）
    /// </summary>
    public class AccountNameAttribute : RegularExpressionAttribute
    {
        const string AccountNamePattern = @"^[a-zA-Z][\w\d]{5,17}$";
        /// <summary>
        /// 账户名验证（必须字母开头，6-18位）
        /// </summary>
        public AccountNameAttribute() : base(AccountNamePattern)
        {
        }
    }
}
